package com.aaa.inside.mapper;

import com.aaa.entity.inside.InventoryLocatorDetail;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author aaa
 * @since 2020-11-30
 */
public interface InventoryLocatorDetailMapper extends BaseMapper<InventoryLocatorDetail> {
    @Select("select id from s_inventory_locator_detail where pid=#{pid}")
    List<Long> selectIdByPid(Long pid);
    /*通过盘点单号查询盘点的所有运单明细*/
    @Select("select d.* from s_inventory_locator_detail d join s_inventory_locator l on d.pid=l.id\n" +
            "join s_inventory y on y.inventoryno=l.inventoryno\n" +
            "where y.inventoryno=#{inventoryno}")
    List<InventoryLocatorDetail> selectDetailByIno(String inventoryno);
}
